import request from '@/utils/request'

export function getCase(admin_id, token) {
  return request({
    url: '/_adminCase/list',
    method: 'post',
    data: {
      admin_id,
      token
    }
  })
}

export function createCase(data) {
  return request({
    url: '/_adminCase/add',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data
  })
}

export function updateCase(data) {
  return request({
    url: '/_adminCase/edit',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data
  })
}

export function deleteCase(admin_id, token, case_id) {
  return request({
    url: '/_adminCase/delete',
    method: 'post',
    data: {
      admin_id,
      token,
      case_id
    }
  })
}
